﻿<Window x:Class="P2.Cuberry.Modules.SimpleSCM.SCProduct.SCProductsDetailsView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"  
    xmlns:basec="clr-namespace:P2.Cuberry.Framework.Helper;assembly=P2.Cuberry.Framework.Helper" 
        
        Icon="/P2.Cuberry;component/Images/CuberryIcon32.ico"
        Title="Peacequare Cuberry" Width="920" Height="480"  
        Background="{DynamicResource P2BackgroundBrush}" 
        Closing="Window_Closing"
        >

    <Window.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="/P2.Cuberry.Framework.Layout;component/Styles/Styles.xaml"/>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Window.Resources>

    <Grid>
        <Grid.Resources>
            <Image x:Key="SaveIcon" Height="16" Width="16" Source="/P2.Cuberry.Modules.SimpleSCM.SCProduct;component/Images/save.png" />
            <Image x:Key="CancelIcon" Height="16" Width="16" Source="/P2.Cuberry.Modules.SimpleSCM.SCProduct;component/Images/cancel.png" />
            <Image x:Key="ClosingIcon" Height="16" Width="16" Source="/P2.Cuberry.Modules.SimpleSCM.SCProduct;component/Images/save.png" />

            <Image x:Key="Printer2Icon" Height="16" Width="16" Source="/P2.Cuberry.Modules.SimpleSCM.SCProduct;component/Images/printer2.png" />


        </Grid.Resources>


        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>

        <Grid.RowDefinitions>
            <RowDefinition Height="40" />
            <RowDefinition Height="35" />
            <RowDefinition Height="*"/>
            <RowDefinition Height="35" />
        </Grid.RowDefinitions>

        <!-- Row 0 Start -->        
        <Label Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="3" Content="{Translate DialogHeaderSCProductDetail}" Style="{StaticResource P2DetailViewHeaderTextStyle}" />
        
        <Separator Margin="0,0,0,0" Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="3" VerticalAlignment="Bottom" Height="0"/>
        <!-- Row 0 End -->

        <!-- Row 1: Menu Start -->
        <Border  Grid.Row="1" Grid.Column="0"  Style="{StaticResource P2MenuBorderStyle}">
            <Menu Grid.Row="1" x:Name="menuMain" Style="{StaticResource P2MenuStyle}" >
                <MenuItem x:Name="SaveBtn" Margin="2,1,0,2"  InputGestureText="Ctrl+S" Header="{Translate SaveBtn}" Command="{Binding SCProductSaveCommand}"  Icon="{StaticResource SaveIcon}" Style="{StaticResource P2MenuItemStyle}" />
                <MenuItem x:Name="CloseBtn" Margin="2,1,0,2" InputGestureText="Ctrl+X" Header="{Translate SaveAndCloseBtn}" Command="{Binding SCProductCloseCommand}" Icon="{StaticResource CancelIcon}" Style="{StaticResource P2MenuItemStyle}"/>
                                
                <MenuItem x:Name="PrintBtn" Margin="2,1,0,2" Header="{Translate PrintBtn}" Click="PrintBtn_Click" Icon="{StaticResource Printer2Icon}" Style="{StaticResource P2MenuItemStyle}"/>

            </Menu>
        </Border>


        <!-- Row 1 End -->

        <!-- Row 2: All Fields -->
        <Border  Grid.Row="2" Grid.Column="0"  Style="{StaticResource P2ContentBorderStyle}">
            <Grid Grid.Row="2" Grid.Column="0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="604*"/>
                    <ColumnDefinition Width="0*" />
                </Grid.ColumnDefinitions>

                <Grid.RowDefinitions>
                    <RowDefinition Height="*" />
                </Grid.RowDefinitions>
                <Label Margin="10,6,0,0" Name="ProductCodeL" Height="28" VerticalAlignment="Top" Content="{Translate ProductCodeL}" HorizontalAlignment="Left" Width="120"></Label>
                <TextBox Margin="10,27,0,0" Name="ProductCode" Height="23" Text="{Binding ProductCode, ValidatesOnExceptions=True, NotifyOnValidationError=True, ValidatesOnDataErrors=True}" Validation.ErrorTemplate="{StaticResource ErrorTemplate}" Style="{StaticResource P2TextBoxStyle}" VerticalAlignment="Top" HorizontalAlignment="Left" Width="247.47" />
                
                <Label Margin="10,52,0,0" Name="ProductNameEnL" Height="28" VerticalAlignment="Top" Content="{Translate ProductNameEnL}" HorizontalAlignment="Left" Width="120"></Label>
                <TextBox Margin="10,73,0,0" Name="ProductNameEn" Height="23" Text="{Binding ProductNameEn, ValidatesOnExceptions=True, NotifyOnValidationError=True, ValidatesOnDataErrors=True}" Validation.ErrorTemplate="{StaticResource ErrorTemplate}" Style="{StaticResource P2TextBoxStyle}" VerticalAlignment="Top" HorizontalAlignment="Left" Width="247.47" />
                
                <Label Content="{Translate ProductNameDeL}" Height="28" HorizontalAlignment="Left" Margin="10,92,0,0" Name="ProductNameDeL" VerticalAlignment="Top" Width="120" />
                <TextBox Height="23" HorizontalAlignment="Left" Margin="10,114,0,0" Name="ProductNameDe" Style="{StaticResource P2TextBoxStyle}" Text="{Binding ProductNameDe, ValidatesOnExceptions=True, NotifyOnValidationError=True, ValidatesOnDataErrors=True}" Validation.ErrorTemplate="{StaticResource ErrorTemplate}" VerticalAlignment="Top" Width="247.47" />
                
                <Label Content="{Translate ProductNameArL}" Height="28" HorizontalAlignment="Left" Margin="10,133,0,0" Name="ProductNameArL" VerticalAlignment="Top" Width="120" />
                <TextBox HorizontalAlignment="Left" Margin="10,154,0,0" Name="ProductNameAr" Style="{StaticResource P2TextBoxStyle}" Text="{Binding ProductNameAr, ValidatesOnExceptions=True, NotifyOnValidationError=True, ValidatesOnDataErrors=True}" Validation.ErrorTemplate="{StaticResource ErrorTemplate}" Width="247.47" Height="23" VerticalAlignment="Top" />
                <Label Content="{Translate DescriptionL}" HorizontalAlignment="Left" Margin="10,184,0,0" Name="DescriptionL" Width="120" Height="28" VerticalAlignment="Top" />
                <TextBox Height="23" HorizontalAlignment="Left" Margin="10,205,0,0" Name="Description" Style="{StaticResource P2TextBoxStyle}" Text="{Binding Description, ValidatesOnExceptions=True, NotifyOnValidationError=True, ValidatesOnDataErrors=True}" Validation.ErrorTemplate="{StaticResource ErrorTemplate}" VerticalAlignment="Top" Width="247.47" />
                <Label Content="{Translate PurchaseUnitEANL}" Height="28" HorizontalAlignment="Left" Margin="10,226,0,0" Name="PurchaseUnitEANL" VerticalAlignment="Top" Width="120" />
                <TextBox Height="23" HorizontalAlignment="Left" Margin="10,248,0,0" Name="PurchaseUnitEAN" Style="{StaticResource P2TextBoxStyle}" Text="{Binding PurchaseUnitEAN, ValidatesOnExceptions=True, NotifyOnValidationError=True, ValidatesOnDataErrors=True}" Validation.ErrorTemplate="{StaticResource ErrorTemplate}" VerticalAlignment="Top" Width="247.47" />
                <Label Content="{Translate SellingUnitEANL}" Height="28" HorizontalAlignment="Left" Margin="10,269,0,0" Name="SellingUnitEANL" VerticalAlignment="Top" Width="120" />
                <TextBox Height="23" HorizontalAlignment="Left" Margin="10,290,0,0" Name="SellingUnitEAN" Style="{StaticResource P2TextBoxStyle}" Text="{Binding SellingUnitEAN, ValidatesOnExceptions=True, NotifyOnValidationError=True, ValidatesOnDataErrors=True}" Validation.ErrorTemplate="{StaticResource ErrorTemplate}" VerticalAlignment="Top" Width="247.47" />
                
                <TabControl Margin="341,3,3,0" Name="tabControl1" MinWidth="540" MinHeight="317" BorderBrush="{DynamicResource P2BackgroundBrush}"   VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
                    <TabItem Header="tabItem1" Name="tabItem1" Background="White" >
                        <Grid  Background="White">
                            <Label Margin="159,93,264.53,0" Content="{Translate VATCategoryIDL}"  Name="VATCategoryIDL" Height="27.723" VerticalAlignment="Top" />
                            <ComboBox Margin="159,113,173,0" DisplayMemberPath="VATCategoryNameCur" Name="VATCategoryID" SelectedValuePath="VATCategoryID" SelectedValue="{Binding VATCategoryID, ValidatesOnExceptions=True, NotifyOnValidationError=True, ValidatesOnDataErrors=True}"   
                                      ItemsSource="{Binding Countries}"
                                      IsEnabled="{Binding IsEditable}"
                                      Style="{StaticResource P2ComboBoxStyle}" Validation.ErrorTemplate="{StaticResource ErrorTemplate}" Height="23.723" VerticalAlignment="Top" />
                            <Label Content="{Translate FiAccountNoL}" Margin="159,191,251,0" Name="FiAccountNoL" Height="27.723" VerticalAlignment="Top" />
                            <TextBox Margin="159,212,173,0" Name="FiAccountNo" Style="{StaticResource P2TextBoxStyle}" Text="{Binding FiAccountNo, ValidatesOnExceptions=True, NotifyOnValidationError=True, ValidatesOnDataErrors=True}" Validation.ErrorTemplate="{StaticResource ErrorTemplate}" Height="22.723" VerticalAlignment="Top" />

                            <Label Content="{Translate CurrencyIDL}" HorizontalAlignment="Left" Margin="13,234,0,0" Name="CurrencyIDL" Width="109.47" Height="27.723" VerticalAlignment="Top" />
                            <ComboBox DisplayMemberPath="CurrencyCur" HorizontalAlignment="Left" IsEnabled="{Binding IsEditable}" ItemsSource="{Binding Currencys}" Margin="13,254,0,0" Name="CurrencyID" SelectedValue="{Binding CurrencyID, ValidatesOnExceptions=True, NotifyOnValidationError=True, ValidatesOnDataErrors=True}" SelectedValuePath="CurrencyID" Style="{StaticResource P2ComboBoxStyle}" Validation.ErrorTemplate="{StaticResource ErrorTemplate}" Width="107" Height="23.723" VerticalAlignment="Top" />
                            
                            <Label Content="{Translate ProductUnitIDL}" Margin="159,234,261.53,0" Name="ProductUnitIDL" Height="27.723" VerticalAlignment="Top" />
                            <ComboBox DisplayMemberPath="ProductUnitCur" IsEnabled="{Binding IsEditable}" ItemsSource="{Binding ProductUnits}" Margin="159,254,264,0" Name="ProductUnitID" SelectedValue="{Binding ProductUnitID, ValidatesOnExceptions=True, NotifyOnValidationError=True, ValidatesOnDataErrors=True}" SelectedValuePath="ProductUnitID" Style="{StaticResource P2ComboBoxStyle}" Validation.ErrorTemplate="{StaticResource ErrorTemplate}" Height="23.723" VerticalAlignment="Top" />
                            
                        </Grid>
                    </TabItem>
                    <TabItem Header="tabItem2" Name="tabItem2" Background="White" >                    
                        <Grid  Background="White" >
                            <Label Margin="0,10.001,115,0" Content="{Translate ProductCategoryIDL}"  Name="ProductCategoryIDL" Height="27.723" VerticalAlignment="Top" HorizontalAlignment="Right" Width="126" />
                            <ComboBox Margin="0,30.001,23,0" DisplayMemberPath="CategoryNameCur" Name="ProductCategoryID" SelectedValuePath="ProductCategoryID" SelectedValue="{Binding ProductCategoryID, ValidatesOnExceptions=True, NotifyOnValidationError=True, ValidatesOnDataErrors=True}"   
                                      ItemsSource="{Binding ProductCategorys}"
                                      IsEnabled="{Binding IsEditable}"
                                      Style="{StaticResource P2ComboBoxStyle}" Validation.ErrorTemplate="{StaticResource ErrorTemplate}" Height="23.722" VerticalAlignment="Top" HorizontalAlignment="Right" Width="218" />


                            <Label Margin="0,56,135,0" Content="{Translate ProductTypeIDL}"  Name="ProductTypeIDL" Height="27.723" VerticalAlignment="Top" HorizontalAlignment="Right" Width="106" />
                            <ComboBox Margin="0,76,23,0" DisplayMemberPath="ProductTypeCur" Name="ProductTypeID" SelectedValuePath="ProductTypeID" SelectedValue="{Binding ProductTypeID, ValidatesOnExceptions=True, NotifyOnValidationError=True, ValidatesOnDataErrors=True}"   
                                      ItemsSource="{Binding ProductTypes}"
                                      IsEnabled="{Binding IsEditable}"
                                      Style="{StaticResource P2ComboBoxStyle}" Validation.ErrorTemplate="{StaticResource ErrorTemplate}" Height="23.722" VerticalAlignment="Top" HorizontalAlignment="Right" Width="218" />
                            <Label Content="{Translate NoteL}" HorizontalAlignment="Left" Margin="9,148,0,0" Name="NoteL" Width="120" Height="22.723" VerticalAlignment="Top" />
                            <TextBox IsReadOnly="{Binding IsReadOnly}" Margin="9,169,6,5" Name="Note" Style="{StaticResource P2TextBoxStyle}" Text="{Binding Note, ValidatesOnExceptions=True, NotifyOnValidationError=True, ValidatesOnDataErrors=True}" VerticalScrollBarVisibility="Auto" />
                        </Grid  >                        
                    </TabItem>
                </TabControl>
            </Grid>
        </Border>

        <!-- Row 2: End -->


        <!-- Row 3: Bottom: Status Bar Start -->
        <Border Grid.Row="3" Grid.Column="0" Style="{StaticResource P2StatusStripBorderStyle}" >
            <Grid Grid.Row="3" Grid.Column="0" Style="{StaticResource P2StatusStripGridStyle}">
                <basec:P2StatusStrip x:Name="StatusStrip" MessageStack2="{Binding MessageStack}"  Grid.Column="0" Grid.Row="3" Height="Auto" Width="Auto" Background="White" HorizontalAlignment="Left" ContentStringFormat=""></basec:P2StatusStrip>
                <TextBox Name="Status" Grid.Column="0" Grid.Row="3" Height="Auto" Width="Auto" Background="White" HorizontalAlignment="Right" Text="{Binding StatusName, Mode=OneWay}" IsReadOnly="True" BorderBrush="Transparent" />
            </Grid>
        </Border>

        <!-- Row 3: End -->
    </Grid>
</Window>
